package cn.classg.rabbitmq.properties;

import lombok.Data;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

/**
 * @author CLASSG
 */
@Data
@Configuration
@ConfigurationProperties(prefix = "rabbitmq")
public class SettingConfiguration {

    @Autowired
    private Callback callback;

    @Autowired
    private Scan scan;

    @Autowired
    private Converter converter;

    @Data
    @Configuration
    @ConfigurationProperties(prefix = "callback")
   public class Callback{

       private boolean enabled;
   }

    @Data
    @Configuration
    @ConfigurationProperties(prefix = "scan")
    public class Scan{
        private String packages;
    }

    @Data
    @Configuration
    @ConfigurationProperties(prefix = "converter")
    public class Converter{

        @Autowired
        private Module module;

        @Data
        @Configuration
        @ConfigurationProperties(prefix = "module")
        public class Module{
            private String scan;
        }


    }

}
